<script lang="ts" setup>
const clickHandle = () => {
  alert('点击成功')
}

const onMouseenter = () => {
  console.log('输入移入')
}

const onMouseleave = () => {
  console.log('输入移出')
}
</script>

<template>
  <button @click="clickHandle()">点我</button>
  <div class="box" @mouseenter="onMouseenter()" @mouseleave="onMouseleave()">
    鼠标移入移出
  </div>
</template>

<style scoped>
.box {
  width: 100px;
  height: 100px;
  background-color: pink;
}
</style>